package com.xnyzc.lhy.mis.feign.heli;

import com.xnyzc.lhy.common.entity.Rv;
import com.xnyzc.lhy.mis.feign.fallback.heli.WorkSheetToHeLiServiceFallback;
import com.xnyzc.lhy.resource.entity.worksheet.OaSysWorksheetEntity;
import com.xnyzc.lhy.resource.entity.worksheet.UpdateTicketStatusEntity;
import com.xnyzc.lhy.resource.entity.worksheet.UrgentTicketEntity;
import com.xnyzc.lhy.resource.entity.worksheet.param.heli.LoginSynchronousParam;
import com.xnyzc.lhy.resource.entity.worksheet.param.heli.RoleSynchronousParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;

@FeignClient(name = "${feign.applicationName.resource}", fallback = WorkSheetToHeLiServiceFallback.class)
public interface WorkSheetToHeLiService {

    /**
     *
     *  调用合力
     *  创建工单接口
     *  第三方来源的工单推送到合力系统，需要传递渠道标识
     *
     * */
    @PostMapping("/worksheet/toheli/createTicket")
    Rv createTicket(OaSysWorksheetEntity oaSysWorksheetEntity);

    /**
     *  第三方系统创建的工单如果有加急操作需要实时同步到合力系统
     *
     * */
    @PostMapping("/worksheet/toheli/urgentTicket")
    Rv urgentTicket(UrgentTicketEntity urgentTicket);

    /**
     *  第三方系统推送过来的工单如果有状态改变操作需要实时同步到合力系统
     *
     * */
    @PostMapping("/worksheet/toheli/updateTicketStatus")
    Rv updateTicketStatus(UpdateTicketStatusEntity updateTicketStatusEntity);

    /**
     * 获取角色数据
     *
     * @return
     */
    @PostMapping("/worksheet/toheli/getLoginSynchronous")
    Rv getLoginSynchronous(LoginSynchronousParam param);

    /**
     * 获取角色详情
     *
     * @return
     */
    @PostMapping("/worksheet/toheli/getRoleSynchronous")
    Rv getRoleSynchronous(RoleSynchronousParam param);
}
